import { App } from "vue";
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
export const routes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    name: "login",
    component: () => import("@render/views/login/index.vue"),
    meta: {
      title: "登录",
    },
  },
  {
    path: "/dashborad",
    name: "dashborad",
    component: () => import("@render/views/dashboard/index.vue"),
    meta: {
      title: "登录",
    },
  },
];

const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export function setupRouter(app: App) {
  app.use(router);
}

export default router;
